home *** CD-ROM | disk | FTP | other *** search
- /*****
- * FILE: CMacLockDoc.c
- * Programmer: Mark Bykerk Kauffman
- * Date: 1/91
- * Purpose:
- * Document methods for MacLock.
- * PARENTCLASS = CStarterDoc
- *
- *****/
-
- #include <Global.h>
- #include <Commands.h>
- #include <CDesktop.h>
- #include <CScrollPane.h>
- #include "CMacLockPane.h"
- #include "CMacLockDoc.h"
-
- /* Global Variables for objects of this class. */
- extern CDesktop *gDesktop;
-
- /* Class Constants */
- #define WINDMacLock 500 /* Resource ID for the MacLock window. */
-
- /* METHOD IMPLEMENTATIONS */
-
- /*****
- * IMacLockDoc
- *
- * MacLockDoc's initialization method.
- *
- *****/
-
- void CMacLockDoc::IMacLockDoc(CBureaucrat *aSupervisor, Boolean printable)
-
- {
- CDocument::IDocument(aSupervisor, printable);
- }
-
-
- /*****
- * BuildWindow
- *
- * The NewFile() and OpenFile() in the MacLockDoc's parent class use
- * this method to create a window. Because MacLock doesn't do anything
- * with files, NewFile and OpenFile methods do not need to be defined
- * for MacLock. MacLock's window is unique to MacLock so BuildWindow
- * does need to be defined.
- *
- *****/
-
- void CMacLockDoc::BuildWindow (Handle theData)
-
- {
- CScrollPane *theScrollPane;
- CMacLockPane *theMainPane;
-
- itsWindow = new(CWindow);
- itsWindow->IWindow(WINDMacLock, FALSE, gDesktop, this);
-
- theScrollPane = new(CScrollPane);
-
- /* Initialize theScrollPane without scroll bars or size box.
- */
- theScrollPane->IScrollPane(itsWindow, this, 10, 10, 0, 0,
- sizELASTIC, sizELASTIC,
- FALSE, FALSE, FALSE);
-
- theScrollPane->FitToEnclFrame(TRUE, TRUE);
-
- theMainPane = new(CMacLockPane);
- itsMainPane = theMainPane;
- itsGopher = theMainPane;
-
- theMainPane->IMacLockPane(theScrollPane, this, 0, 0, 0, 0, sizELASTIC, sizELASTIC);
- theMainPane->FitToEnclosure(TRUE, TRUE);
-
- theScrollPane->InstallPanorama(theMainPane);
-
- }
-
-
-